Skip to content

add _repeated_blocks for ErnieImageTransformer2DModel#13496

Merged
dg845 merged 4 commits intohuggingface:mainfrom
kaixuanliu:ernie_image-fix
Apr 22, 2026
Merged

add _repeated_blocks for ErnieImageTransformer2DModel#13496
dg845 merged 4 commits intohuggingface:mainfrom
kaixuanliu:ernie_image-fix

Conversation

@kaixuanliu
Copy link
Copy Markdown
Contributor

This PR fixes failed test case:
tests/models/transformers/test_models_transformer_ernie_image.py::TestErnieImageTransformerCompile::test_torch_compile_repeated_blocks
@yiyixuxu pls help review, thx!

Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
@github-actions github-actions Bot added models size/S PR with diff < 50 LOC labels Apr 17, 2026
@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels Apr 17, 2026
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

Copy link
Copy Markdown
Collaborator

@dg845 dg845 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR! I think we can remove the pytest.mark.skip decorators from the skipped tests in TestErnieImageTransformerCompile since they all pass after this fix.

@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels Apr 20, 2026
@kaixuanliu
Copy link
Copy Markdown
Contributor Author

kaixuanliu commented Apr 20, 2026

@dg845 Thx for your review, but there is a comment: "The repeated block in this model is ErnieImageSharedAdaLNBlock. As a consequence of this, the inputs recorded for the block would vary during compilation and full compilation with fullgraph=True would trigger recompilation." in L119. Hence I am not sure if it is suitable to remove the pytest.mark.skip decorators here. Maybe @HsiaWinter can give some advice on this?

@github-actions github-actions Bot added size/S PR with diff < 50 LOC and removed size/S PR with diff < 50 LOC labels Apr 21, 2026
@dg845
Copy link
Copy Markdown
Collaborator

dg845 commented Apr 22, 2026

Merging this PR as I think we can handle the other skipped TestErnieImageTransformerCompile tests separately in a follow-up PR (and the CI failures are unrelated). @HsiaWinter would still be interested in your input as to whether the _repeated_blocks fix in this PR solves the model compile issues (the currently skipped tests pass after the fix).

@dg845 dg845 merged commit b8aebf4 into huggingface:main Apr 22, 2026
12 of 14 checks passed
terarachang pushed a commit to terarachang/diffusers that referenced this pull request Apr 30, 2026
)

Signed-off-by: Liu, Kaixuan <kaixuan.liu@intel.com>
Co-authored-by: dg845 <58458699+dg845@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

models size/S PR with diff < 50 LOC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants